<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template binding</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../boost_typeerasure/reference.html#doxygen.binding_8hpp" title="Header &lt;boost/type_erasure/binding.hpp&gt;">
<link rel="prev" href="any__cast_8hpp_1af5fce4e0a865de41e533821e363e548f.html" title="Function any_cast">
<link rel="next" href="binding__of_8hpp_1a15c13d0013a0f85d3d56a682d33cac6b.html" title="Function template binding_of">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="any__cast_8hpp_1af5fce4e0a865de41e533821e363e548f.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_typeerasure/reference.html#doxygen.binding_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="binding__of_8hpp_1a15c13d0013a0f85d3d56a682d33cac6b.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.classboost_1_1type__erasure_1_1binding"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template binding</span></h2>
<p>boost::type_erasure::binding</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../boost_typeerasure/reference.html#doxygen.binding_8hpp" title="Header &lt;boost/type_erasure/binding.hpp&gt;">boost/type_erasure/binding.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>

  <span class="comment">// <a class="link" href="classboost_1_1type__erasure_1_1binding.html#id-1_3_39_13_3_1_1_1_3-bb">friend functions</a></span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1ac49c3ec6d26f88c0436a5b0396303b77"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1a12f0ddf15295cb935b306163b59b7bc8"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1type__erasure_1_1binding.html#id-1_3_39_13_3_1_1_1_4-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1acd095d0d0741329384c990ba53fe2442"><span class="identifier">binding</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Map<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1a213a415606f4badea8581315d3504eb6"><span class="identifier">binding</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Map</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Map<span class="special">&gt;</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1a248e56ff2bebd11181020d6b6bfac1be"><span class="identifier">binding</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept2<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1a62e7be63cde4d216a565e0fa236e4af8"><span class="identifier">binding</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a><span class="special">&lt;</span> <span class="identifier">Concept2</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Map</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept2<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1a29d233d696715ae83197d7af39996b09"><span class="identifier">binding</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a><span class="special">&lt;</span> <span class="identifier">Concept2</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Placeholders<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1type__erasure_1_1binding.html#doxygen.classboost_1_1type__erasure_1_1binding_1ae774fc9a0e6aded708aedc6ec6375f1d"><span class="identifier">binding</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1dynamic__binding.html" title="Class template dynamic_binding">dynamic_binding</a><span class="special">&lt;</span> <span class="identifier">Placeholders</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> 
            <span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.39.13.4.3.4"></a><h2>Description</h2>
<p>Stores the binding of a <code class="computeroutput">Concept</code> to a set of actual types. <code class="computeroutput">Concept</code> is interpreted in the same way as with <a class="link" href="classboost_1_1type__erasure_1_1any.html" title="Class template any">any</a>. </p>
<div class="refsect2">
<a name="id-1.3.39.13.4.3.4.3"></a><h3>
<a name="id-1_3_39_13_3_1_1_1_3-bb"></a><code class="computeroutput">binding</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.classboost_1_1type__erasure_1_1binding_1ac49c3ec6d26f88c0436a5b0396303b77"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span> lhs<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true iff the sets of types that the placeholders bind to are the same for both arguments.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.classboost_1_1type__erasure_1_1binding_1a12f0ddf15295cb935b306163b59b7bc8"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span> lhs<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a> <span class="special">&amp;</span> rhs<span class="special">)</span><span class="special">;</span></pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true iff the arguments do not map to identical sets of types.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.39.13.4.3.4.4"></a><h3>
<a name="id-1_3_39_13_3_1_1_1_4-bb"></a><code class="computeroutput">binding</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.classboost_1_1type__erasure_1_1binding_1acd095d0d0741329384c990ba53fe2442"></a><span class="identifier">binding</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><a class="link" href="structboost_1_1type__erasure_1_1relaxed.html" title="Struct relaxed">relaxed</a> must be in <code class="computeroutput">Concept</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Map<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="doxygen.classboost_1_1type__erasure_1_1binding_1a213a415606f4badea8581315d3504eb6"></a><span class="identifier">binding</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">Map</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">Map</code> must be an MPL map with an entry for each placeholder referred to by <code class="computeroutput">Concept</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Map<span class="special">&gt;</span> <a name="doxygen.classboost_1_1type__erasure_1_1binding_1a248e56ff2bebd11181020d6b6bfac1be"></a><span class="identifier">binding</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p><code class="computeroutput">Map</code> must be an MPL map with an entry for each placeholder referred to by <code class="computeroutput">Concept</code>.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Nothing. </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept2<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
  <a name="doxygen.classboost_1_1type__erasure_1_1binding_1a62e7be63cde4d216a565e0fa236e4af8"></a><span class="identifier">binding</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a><span class="special">&lt;</span> <span class="identifier">Concept2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> other<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Map</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Converts from another set of bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Map must be an MPL map with an entry for each placeholder referred to by <code class="computeroutput">Concept</code>. The mapped type should be the corresponding placeholder in Concept2.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>std::bad_alloc </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept2<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
  <a name="doxygen.classboost_1_1type__erasure_1_1binding_1a29d233d696715ae83197d7af39996b09"></a><span class="identifier">binding</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1binding.html" title="Class template binding">binding</a><span class="special">&lt;</span> <span class="identifier">Concept2</span> <span class="special">&gt;</span> <span class="special">&amp;</span> other<span class="special">,</span> <span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Converts from another set of bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Map must be an MPL map with an entry for each placeholder referred to by <code class="computeroutput">Concept</code>. The mapped type should be the corresponding placeholder in Concept2.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>std::bad_alloc </td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Placeholders<span class="special">,</span> <span class="keyword">typename</span> Map<span class="special">&gt;</span> 
  <a name="doxygen.classboost_1_1type__erasure_1_1binding_1ae774fc9a0e6aded708aedc6ec6375f1d"></a><span class="identifier">binding</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="classboost_1_1type__erasure_1_1dynamic__binding.html" title="Class template dynamic_binding">dynamic_binding</a><span class="special">&lt;</span> <span class="identifier">Placeholders</span> <span class="special">&gt;</span> <span class="special">&amp;</span> other<span class="special">,</span> 
          <span class="keyword">const</span> <a class="link" href="structboost_1_1type__erasure_1_1static__binding.html" title="Struct template static_binding">static_binding</a><span class="special">&lt;</span> <span class="identifier">Map</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Converts from another set of bindings.</p>
<p>

</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Map must be an MPL map with an entry for each placeholder referred to by <code class="computeroutput">Concept</code>. The mapped type should be the corresponding placeholder in Concept2.</p></td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>
<p class="simpara">std::bad_alloc </p>
<p class="simpara">std::bad_any_cast </p>
</td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2011-2013 Steven Watanabe<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="any__cast_8hpp_1af5fce4e0a865de41e533821e363e548f.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_typeerasure/reference.html#doxygen.binding_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="binding__of_8hpp_1a15c13d0013a0f85d3d56a682d33cac6b.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
